<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h4 class="modal-title">设备状态</h4>
</div>
<form id="defaultForm" method="post" class="form-horizontal" action="/project/indexManage/status_save">

    <div class="modal-body">
        <input name="id"  style="display: none" th:value="${equipmentInfo.id}">
        <div class="form-group">
            <label class="col-lg-3 control-label">编号</label>
            <div class="col-lg-6">
                <input type="text" class="form-control" name="code" th:value="${equipmentInfo.code}" />
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg-3 control-label">名称</label>
            <div class="col-lg-6">
                <input type="text" class="form-control" name="name" th:value="${equipmentInfo.name}" />
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg-3 control-label">工作状态</label>

            <label name = "statusExpression" id = "0">0=</label>
            <input type="text" name="status" size="10" th:value="${one}"/>
            <label name = "statusExpression" id = "1">1=</label>
            <input type="text" name="status" size="10" th:value="${two}"/>
            <button type="button" onclick=aa() >＋</button>
            <button type="button"  onclick=bb()>－</button>

        </div>

        <div class="form-group" id="sE" hidden>
            <label class="col-lg-3 control-label"></label>

            <label name = "statusExpression" >2=</label>
            <input type="text" name="status" size="10" th:value="${three}"/>
            <label name = "statusExpression" >3=</label>
            <input type="text" name="status" size="10"  th:value="${four}"/>

        </div>


        <div class="form-group">
            <label class="col-lg-3 control-label">适用对象</label>
            <div class="col-lg-6">
                <select class="form-control" name="objName">
                    <option th:each="parameter:${objects}" th:value="${parameter.remark}" th:text="${parameter.name}"
                            th:selected="${parameter.remark eq equipmentInfo.objName + ''}"></option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg-3 control-label">来源</label>
            <div class="col-lg-6">
                <select class="form-control" name="source">
                    <option th:each="parameter:${sources}" th:value="${parameter.remark}" th:text="${parameter.name}"
                            th:selected="${parameter.remark eq equipmentInfo.source + ''}">
                    </option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg-3 control-label">是否展示</label>
            <div class="col-lg-6">
                <div class="checkbox">
                    <label>
                        <input type="checkbox" name="isShow" th:value="${equipmentInfo.isShow}"
                               th:checked="${equipmentInfo.isShow}" onclick="this.value=(this.value==0)?1:0">
                    </label>
                </div>
            </div>
        </div>

    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="submit" class="btn btn-primary">保存</button>
    </div>
</form>

<script>
    //表单初始化
    initCheck();

    function aa(){
        $("#sE").show();
    }
    function bb(){
        $("#sE").hide()
    }
</script>